import {
  listAllData,
} from '@/services/riskFactorQRCodeManagementApi';

export default {
  namespace: 'riskFactorQRCodeManagement',

  state: {
    // 机构列表
    data: {
      list: [],
      pagination: {},
    },
  },

  effects: {
    *listAllData({ payload }, { call, put }) {
      const response = yield call(listAllData, payload);
      yield put({
        type: 'cb4listAllData',
        payload: response,
      });
    },
  },

  reducers: {
    cb4listAllData(state, action) {
      return {
        ...state,
        data: action.payload.data,
      };
    },
  },
};
